1_MerchantSeeder.ts ➔ run   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 13
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 12
dl 0
loc 13
c 0
b 0
f 0
rs 9.8
cc 1
1
import BaseSeeder from '@ioc:Adonis/Lucid/Seeder'
2
import Merchant from 'App/Models/Merchant'
3
import moment from 'moment'
4
import crypto from 'crypto'
5
6
export default class extends BaseSeeder {
7
  public async run () {
8
    // Write your database queries inside the run method
9
    await Merchant.firstOrCreate(
10
    {
11
      email: '[email protected]'
12
    },
13
    {
14
      name: 'Test Merchant',
15
      email: '[email protected]',
16
      emailVerifiedAt: moment().format('YYYY-MM-DD HH:mm:ss'),
17
      password: '12345678',
18
      rememberMeToken: crypto.randomBytes(20).toString('hex'),
19
      isMerchant: true,
20
    })
21
  }
22
}
23